$('.page').height($(window).height());
//设置字体自适应大小
(function (doc, win) {
		  var docEl = doc.documentElement,
			resizeEvt = 'orientationchange' in window ? 'orientationchange' : 'resize',
			recalc = function () {
			  var clientWidth = docEl.clientWidth;
			  if (!clientWidth) return;
			  docEl.style.fontSize = 20 * (clientWidth / 320) + 'px';
			};
		  if (!doc.addEventListener) return;
		  win.addEventListener(resizeEvt, recalc, false);
		  doc.addEventListener('DOMContentLoaded', recalc, false);
		})(document, window);
//服务器提示信息
function hint(hint){
	if(hint)
	{
		$('.hint_bg').css("display","block");
		$('.hint_bg').height($(window).height());
		$('.hint_text').html(hint);
		$('.hint_btn').click(function(){
			$('.hint_bg').css("display","none");
		});
	}
}
function hint1(hint1){
    if(hint1)
    {
        $('.hint_bg1').height($(window).height());
        $('.hint_bg1').css("display","block");
        $('.hint_text1').html(hint1);
    }
}
//用户信息
function Fill_info(info_tit,p_item){
	$('.info_bg').height($(window).height());
	$('.info_bg').css('display','block');
	$('.info_title').html(info_tit);
	$('.edit_box').html(p_item.children('span').eq(1).html());
	$('.info_no').unbind('click').click(function(){
		$('.info_bg').css('display','none');
	})
	$('.info_yes').unbind('click').click(function(){
		var edit_txt = $('.edit_box').html();
		$(p_item).children('span').eq(1).html(edit_txt);
		$('.info_bg').css('display','none');
	});
};

$('.writeP').click(function(){
	var p_item = $(this);
	var info_tit = $(this).children('span').eq(0).html();
	Fill_info(info_tit,p_item);
});
$('.sex').click(function(){
	var _this;
	$('.sex_bg').height($(window).height());
	$('.sex_bg').css("display","block");
	$('.sex_item').unbind('click').click(function(){
		_this=$(this);
		$(this).addClass('achecked').siblings().removeClass('achecked');
	});
	$('.sex_no').unbind('click').click(function(){
		$('.sex_bg').css("display","none");
	});
	$('.sex_yes').unbind('click').click(function(){
		$('.sex_bg').css("display","none");
		$('.sex').children('span').eq(1).html(_this.html());
	});
});

